package com.teatrace.model.process;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="r_processflow_processtype")
public class Consist {
	@Id
	@Column(name="r_processflow_processtype_id")
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private long id;
	
	@Column(name="order_number")
    private int ordernumber;
	
	@ManyToOne(cascade=CascadeType.PERSIST)
	@JoinColumn(name="process_type_id")
	private ProcessType processtype;
	
	@ManyToOne(cascade=CascadeType.PERSIST)
	@JoinColumn(name="process_flow_id")
	private ProcessFlow processflow;

	public int getOrdernumber() {
		return ordernumber;
	}

	public void setOrdernumber(int ordernumber) {
		this.ordernumber = ordernumber;
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public ProcessType getProcesstype() {
		return processtype;
	}

	public void setProcesstype(ProcessType processtype) {
		this.processtype = processtype;
	}

	public ProcessFlow getProcessflow() {
		return processflow;
	}

	public void setProcessflow(ProcessFlow processflow) {
		this.processflow = processflow;
	}	
}
